import wx


class MyFrame(wx.Frame):
    def __init__(self):
        super().__init__(None, title="Example")

        panel = wx.Panel(self)
        sizer = wx.BoxSizer(wx.HORIZONTAL)

        self.bt_cancel = wx.Button(panel, label="Cancel")

        # 修正参数名和类型
        sizer.Add(self.bt_cancel, proportion=0, flag=wx.ALIGN_CENTER | wx.ALL, border=5)

        panel.SetSizer(sizer)
        self.Show()


if __name__ == "__main__":
    app = wx.App()
    frame = MyFrame()
    app.MainLoop()
